perm filename TRIP.TEX[TUG,DEK]1 blob sn#669451 filedate 1982-07-25 generic text, type T, neo UTF8
\chcode `\% = 5 % this is the funny test file for TeX82 (temporary version)
% hi_mem_base=600 and mem_max=1000 are recommended when debugging
\chcode `{ = 1
\chcode `} = 2
\chcode `$ = 3
\chcode `& = 4
\let\paR=\par
\def\par{\chcode `\% 14}
  % this line should change % from type 5 to type 14
\let\par=\paR
\ifx\initex\undefined{\def\initex{} % we do this with INITEX only
  \chcode `# = 6 % # for parameters
  \chcode `↑ = 7 % ↑ for superscripts
  \chcode `| = 8 % | for subscripts
  \chcode `~ = 9 % ~ will be ignored
  \chcode `* = 10 % * will be like a space
  \chcode `\@ = 15 % @ will be invalid
  \chcode `↑↑A = 8 % this is another way to get a subscript
  \chcode `\↑↑@ = 11 % a strange letter will be allowed
  \chcode `\↑↑? = 0 % and so will a strange escape delimiter
  \font 10 = trip % see TRIP.PL for details of this font
  ↑↑?:10
  \font30=trip at 5pt % this will be our symbols font
  \texinfo30 22 7pt % the axis height
  \textfont2=30 \scriptfont2 30 \scriptscriptfont2 3~0
  \font 20=trip at 10pt % font 20 will be the same as font 10
  \scrollmode
  \def\on{1}
  \showthe\:
  \font 40=trip at 20pt % this will be extension font
  \textfont3=40
  \patterns{.aa1b3 *1aca. b2b b1c} % remember that * is just like space
  \hyphenation{b-b-b-b-b-b tiny }
  \setskip200 = 10pt plus5filllminus 0 fill
  \setbox200=\vbox{\hrule\vskip\skip200}
  \setskip100 -18pt plus\the\chcode`\}fil minus 10pt
  \advskip100 by \skip200
  \setdimen33=3pt
  \setcount33=\the\dimen33
  \divskip100 by \count33
  \multskip100 by \count33 % so \skip100=-6pt plus 3filll minus 9pt
  \setcount200 -5
  \multcount200 by -100 % \count200 is 500
  \setcount100=1000000
  \divcount100 by \count200 % \count100 is 2000
  \setdimen100=10in
  \multdimen100 by 10
  \divdimen100 by 9 % \dimen100 is 803pt
  \lineskip 0pt plus 40pt
  \baselineskip=10pt plus 41pt
  \parskip 0pt plus 42pt minus 8pt
  \splittopskip 1pt plus 43pt
  \splitmaxdepth -2pt
  \dispskip 3pt plus 44pt minus\the\baselineskip
  \dispaskip 1pt plus 45pt minus\dimen100
  \dispbskip 1pt plus 46pt
  \thinmskip 1mu plus 2fill minus 3mu
  \medmskip 2mu minus 3mu
  \thickmskip -4mu
  \def\gobble#1{}
  \everypar{A\insert200{\baselineskip400pt
      \hbox{}\hbox to -10pt{}}
    \advcount15by1\mark{\the\count15}
    \paR\gobble} % this aborts every paragraph abruptly
  \hyphenpenalty 88
  \exhyphenpenalty 89
  \widowpenalty 125
  \displaywidowpenalty -125
  \brokenpenalty 37
  \interlinepenalty -125
  \doublehyphendemerits -200000000
  \finalhyphendemerits -200000000
  \mag 2000
  \delimiterfactor 900
  \delimiterlimit 3pt
  \showboxbreadth 9999
  \showboxdepth 9999
  \tracingstats=1
  \tracinglostchars=2
  \nulldelimiterspace --+.1pt
  \scriptspace -0.01pt
  \overfullrule 5pt
  \def\sh{\ifnum\count4>10{}\else{\setdimen5=\count4pt
      \advdimen5 by 10pt
      \xdef\a{\a\the\count4pt \the\dimen5}
      \advcount4 by 1\sh}}
  \let\next=\dump}
\else{\let\next=\relax}
\next % now INITEX will dump the trip.fmt file and halt
\tracingcommands1
\open10=tripos % we will write two lines on tripos.tex
\send10{\uppercase{\number\outputpenalty}} % "mmmmmmmmmm" (-10000)
\send10{\uppercase{\number\the\outputpenalty}} % "mmmmmmmmmm" (-10000)
\vsize 2000pt
\topskip 20pt plus 1fil
\penalty -12345 % this will be ignored since the page is still empty
\maxdepth=2pt
\tracingoutput\on
\moveleft20pt\copy200
\moveright20pt\hbox{\vrule depth20pt height-19pt width1pt}
\penalty-10000 % now the default output routine will act
\setdimen200=10000pt
{\output{\setdimen 9=1ht200\setcount9=\the\dimen9
    \global\setcount0=\the\outputpenalty
    \shipout\hbox{\box100\box200\vsplit 255 to 55pt}
    \showlists
    \message{\topmark:\firstmark:\botmark:\splitfirstmark:\splitbotmark}
    \global\showboxdepth1
    \global\showboxbreadth5
    \unbox255}
  \insert100{\def\box{\vbox to 267.7pt{}}
    \baselineskip 0pt \lineskip 0pt minus .4pt
    \box \penalty-101 \box \penalty-100 \box \penalty-1000
    } % since \dimen100=803pt<3*267.7pt, the insertion splits;
  % and the natural height+depth of the split-off part is 267.7pt;
  % now since \count100=2000,
  % this insertion adds about 535.4pt to the current page
  \topskip1pt plus 44pt
  \vbox expand 1000pt{} % beginning of new page
  \penalty12345
  \cleaders\hbox{\lower2pt\vbox to 17pt{}
    \leaders\hrule\hskip10pt
    \cleaders\hbox{A}\hskip 9pt % the A is 2pt wide
    \leaders\hbox{A}\hskip 9pt
    \xleaders\hbox{A}\hskip 9pt
    \send11{\help} % \send will be ignored in leaders
    }\vskip50pt minus 10pt
  \mark{alpha}
  AAA\everypar{} % because of previous \everypar, this makes 3 paragraphs
  % and each paragraph consists of A\insert 200{400pt of stuff}\mark{n}
  % but \count200=500 so the inserts are rated 200pt each
  % so the third insertion will be split
  \showlists
  \vskip-50pt
  A\hfill\vadjust{\xsend{\the\prevdepth}\penalty-5000}
  \penalty-10000 % forces line break in paragraph
  % this is not the end of paragraph
  A\par\insert200{\vskip10000pt} % this insertion will be held over
  \vskip 1000pt\penalty-333\hbox to 23pt{} % output goes into action
  \global\vsize=100000pt % everything else will fit on one page
  } % now we revert to the default output routine
{\tracingoutput=0\shipout\hbox{\close10}}
\showthe\everypar
\everypar{}
\penalty-22222
\uchyph1
\hsize 100pt
\linepenalty 10000
\indent\hskip0pt plus50pt BBBBBB\end % temporary ending
% the rest of this file will probably change as I get into it!
\tracingmacros=1
\def\t12#101001#{-.#1pt}
\varunit=1.00101pt
\ifdim -0.01vu=\t120100101001001{\relax}\else{\error}
\setcount0=-1
\ifeven0{}\else{\advcount0 by -1}
\output{\showthe\outputpenalty
  \showbox 255
  {\setbox 254=\box255} % box 254 will disappear
  \ifabsent 254{\relax} \else{\error}
  }
\penalty -12345 % output the remaining stuff
% the next part tests line-break computations
% the two competing ways to set the paragraph have respective demerits
% (30+l)↑2+(30+l)↑2+a and (51+l)↑2+l↑2, where a=adjdemerits, l=linepenalty
\adjdemerits=782
\linepenalty=1
\def\1#1{\hbox to#1pt{}}
\valign{\baselineskip20pt\global\parfillskip0pt
  \global\global\parindent0pt
  \global\hsize10pt
  \setbox2\12
  \copy2\hskip2pt plus5pt minus1pt
  \copy2\hskip5pt minus2pt
  \lower2pt\11\hskip3pt % this affects depth of the second line
  \copy2 \hskip2pt plus.5pc
  \box2#\cr
  \noalign{\spacefactor=2000\global\xspaceskip=-1pt}
  \noalign{ }
  \cr % set that paragraph with a=782, l=1 (demerits 2704 vs 2705)
  \adjdemerits=784 \cr % increase a, so the second alternative is better
  \linepenalty=2\vbadness10000\cr % increase l by 1, suppress diagnostic typeout
  \noalign{ }}
\noindent\indent\noindent\hbox expand3pt{}%
\discretionary{AAAB}{B-}{/A\kern2pt}% the widths are 7pt, 4pt, 6pt respectively
 \vbox{\hrule width 4pt} \par % should set with nothing overfull
\penalty-22222 % end of demerits test, hyphenation is next
\looseness-10
\uchyph=1
\hsize 100pt
A /A\char`A BBBBCACAC//% that becomes /[AA]k[BB]k[BB][CA][CA][C/]/,
 % where [] means a ligature and k means a kern. 
 % the word "aabbbbcaca" should be hyphenated to "aa1b3b2b2b1c1aca",
 % which becomes {[AA]k-||[AA]k}{B-|[BB]kBk|[BB][BB]}{C-|A|[CA]}
 % if I use the notation {x|y|z} for \discretionary{x}{y}{z}.
\vadjust{\uchyph=0 BBBBBB} % underfull box will show no hyphens
\vadjust{BBBBBB} % this time we get hyphens
\vadjust{\pretolerance10000 BBBBBB} % again no hyphens

\uccode`m='202 % the trip font contains '202 but not m or M
\input tripos % this makes a paragraph containing "AAAAAAAAAA"
\penalty-33333 % end hyphenation, math is next
\font 10=trip at 10pt % no error message
\font 20=trip % likewise
\font 20 trip at 11pt % whoops
\textfont1=10 \scriptfont1=30 \scriptscriptfont1=40 % [sic]
\def\symbolpar #1*#2*#3*{\texinfo30 #1 = #3 pt}
\symbolpar8 num1 9.1
\symbolpar9 num2 9.2
\symbolpar10 num3  9.3
\symbolpar11 denom1 3.1
\symbolpar12 denom2 3.2
\symbolpar13 sup1 8.1
\symbolpar14 sup2 8.2
\symbolpar15 sup3 8.3
\symbolpar16 sub1 0.1
\symbolpar17 sub2 0.2
\symbolpar18 supdrop 0.3
\symbolpar19 subdrop 0.4
\symbolpar20 delim1 10
\symbolpar21 delim2 20
\mathcode`+='20457 % mathbin, family 1, character '57 (/)
\mathcode`=="322D % mathrel, family 2, character "2D (-)
\delcode`.0 % null delimiter
\delcode`[="161361 % small (family 1, character "61 (a)), large (3,"61)
\chcode`(=13 \chcode`(=13
\def({\delimiter"4162362 } % mathopen, like [ but with b
\setcount4=1 \def\a{} \sh % \def\a{1pt 11pt 2pt 12pt ... 10pt 20pt}
\parshape 10 \a
\hangindent -10pt for 11 % \parshape will take precedence until we kill it
\groupbegin
\looseness 2
\rightskip 0pt plus 10fil
\--\--\- % this makes lines 1 to 3
$$A\over % this will be an error
\halign to\the\displaywidth{#\cr\cr} % the display counts as lines 4 to 6
\global\setcount6=\the\displayindent
\predisplaypenalty=101
\global\postdisplaypenalty\minus\predisplaysize*
\eqno$$% another error
\looseness-2
${A\over A}+\mskip1muA==A+\penalty+1000A
\reloppenalty-2222
\binoppenalty-3333
\mathsurround.11em$ % this formula goes on line 7
$$ % here we begin a hairy display that covers lines 8 to 10
\mkern-9mu
\vcenter{}
↑{\raise 2pt\hbox{a}}
\overline{↑
  {A \mathchar"141 \char`B↑↑A{\mathaccent"161
      {\mathop A \mathbin A \mathopen A \mathpunct A\mathclose A \mathrel A
        \mathaccent"161 {\fam3A}}}}}
\mathop\char`B↑C
\mathop b\limitswitch↑C
\mathord \radical"161 % missing { will be inserted
  {\radical"282382{\left(\scriptscriptstyle\mathop{\underline{
          A\atop\displaystyle A|{A\hfil\over B\nonscript\hskip1pt}}}
      \limitswitch|{\textstyle B\xabovex2pt(.}↑(
      \discretionary{-}{}{\:30A}\nonscript\mskip9mu minus1fil
      \right[}}}
\eqno\scriptstyle(A{\above9pt{\xoverx..{A\xatopx((}}
\showlists$$ % end of the hairy display, missing } will be inserted
\parshape 0 % now the hanging indentation is relevant
\leftskip 0pt plus -10fil
\xsend{\the\hangafter}\ \penalty-10000
\send10{\the\spacefactor}\par % it's illegal to \send the space factor
} % this fails to match \groupbegin
\groupend
\mark{\the\spacefactor} % \spacefactor: not in vertical mode
$$\global\setcount7=\the\predisplaysize
\mskip18mu minus 18mu
\hbox to\the\displaywidth{}
\hss\leqno A\/$$

\hangindent 254cm after 1
\parfillskip 0pt plus 100pt
A A$$\global\setcount8=\the\predisplaysize$$\par
\setcount5=\the\lastskip
\baselineskip 10pt
{\sfcode`A=500\vfuzz30pt
  \vbox to 11pt{\hsize 10pt\tolerance 1 A A A A A A A A\par
    \hfuzz 10pt A A A A A A A A\par}
  }
\vbox to 11pt{\hbadness 100\hbox to 10pt{\hskip 0pt plus 10pt}
  \hbox to 10bp{\hskip 0pt plus 10pt}}
\lineskiplimit-1pt
\def\space{ }
\vbox to 11pt{\tracinglostchars=0 A\/\space\space\ignorespace\space\space J
  \vskip1pt\vskip2\vbox{\mark{vii}}\vskip3pt
  \unskip\setbox22=\lastbox\unskip\vskip\the\minus\lastskip\showbox22}
\showbox22
\show\botmark
\lineskiplimit-0.9999pt
\vbox to 11pt{\accent "42 A A\ \texinfo10 5=88pt\ \ \spaceskip2pt\ }
\penalty-2147483647 % that's the largest value TeX will scan
\tabskip 1009.9sp minus .25cc % and now for alignment tests
\let\a=\halign
\setcount1=2
\def\d#1\d{#1#1}
\setbox3=\vtop{\vskip-3mm} % this box has a depth of -3mm
\halign expand-12.truedd{#\a&
  \vbox{\halign to 0pt{#A&\tabskip2dp3\a\cr}}
  &\hss\tabskip1ex minus7200bp\d#\d\cr % the \d#\d becomes (erroneous) ##
  \global\gdef\a{\global\setcount\count1=\the##\cr
    \omit\cr A&\tabskip} % please don't ask what this does
  \global\edef\a{\uppercase{
      \message{\number-1009}\lowercase{uq}}}\span % the first \a still there
  A&\omit\valign to -5pt{#&#\cr A\cr{ }\cr}\cr
  \lccode`Q=`p \span\omit$$\span A\cr
  \noalign{\prevdepth20pt\errmessage{\count2=\the\count2}}
  }
\errmessage{\prevdepth=\the\prevdepth}
\penalty-88888 % end alignment test, now miscellaneous error messages
\setdimen5='7777777777.sp % this should be OK
\setdimen6='40000pt % this should overflow
\a↑↑@↑↑@a@ % an undefined control sequence followed by invalid character
{\gdef\b{\c} \def\c{} \b} \b % \c is undefined outside the group
\def\b#1\par{}
\outer\gdef\a↑↑@↑↑@a#1\par#2{}
\long\gdef\l#1{}
\outer\global\long\edef\lo#1#2#3#4#5#6#7#8#9#{}
\case 1{\undefined}{\l\par\b{\par} % occurrence of \par aborts \b there
{\b{\lo\undefined}\par}\else{\b{\par}} % but not there!
\let\↑↑C=\halign
\def\↑↑@↑↑C{} \↑↑@↑↑B % use doesn't match definition
\↑↑C{\lo#\cr............{}\cr} % runaway in preamble?
\def\a#1{\l#1\par\a↑↑@↑↑@a#1\par#2} % runaway in definition; #2 illegal
\xdef\a#1{\l#1\par\a↑↑@↑↑@a#1\par#2} % runaway in definition; #2 okay!
↑↑?a↑↑@↑↑@a\par{\lo\par % runaway in use; also the second \par is bad
\lo\par\par\par\par\par\par\par\par\par\par{}
\def\a#2{}
\show A
\show\a↑↑@↑↑@a
\show (
\show\lo
\show\↑↑C
\show\batchmode
\show\error
\showthe\output
\showthe\thinmskip
\if T\par \if\span % aborted
\if 11{\if 0123{\error}\else{\relax}}\else{\error}
$\mark\vadjust\insert&\input\hrule\moveleft\indent % can't do that in math mode
\unbox\accent\valign\vfill\vfil\vfilneg\vss % likewise; \vfill takes us out
\def\a{ab

  \c}\def\b{ab*\par\c}
\ifx\a\ifx\ifx\a\b{\ifinner{\error}\else{\relax}}\else{\error}
\ifvmode{$\ifmmode{\hbox\ifhmode{\hfilneg}\else{\error}}$ % missing { inserted
\else\noalign\omit
\mag=1999

\halign to 1truemm{#\cr
  $\delimiterfactor2000\left(A\cr
  }
#
\long\def\l#1\l{#1}\send 10{\l} % living dangerously
\end
\l	% this may be needed to finish that \send
% things not tested:
% interaction (error insertion/deletion, interrupts, \pause, files not there)
% \nonstopmode, \batchmode, \tracingonline=1
% system-dependent parsing of file names
% most of the error messages and attempts at recovery
% unusual cases of fixed-point arithmetic